package com.work.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the Cards database table.
 * 
 */
@Entity
@Table(name="Cards")
@NamedQuery(name="Card.findAll", query="SELECT c FROM Card c")
public class Card implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idCards;
	private String cardNB;
	private Date creationDate;
	private Date expirationDate;
	private Date updateDate;
	private User userCreatedBy;
	private User userUpdatedBy;
	private User userOwnBy;

	public Card() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getIdCards() {
		return this.idCards;
	}

	public void setIdCards(int idCards) {
		this.idCards = idCards;
	}


	public String getCardNB() {
		return this.cardNB;
	}

	public void setCardNB(String cardNB) {
		this.cardNB = cardNB;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getExpirationDate() {
		return this.expirationDate;
	}

	public void setExpirationDate(Date expirationDate) {
		this.expirationDate = expirationDate;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}


	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="createdBy")
	public User getUserCreatedBy() {
		return this.userCreatedBy;
	}

	public void setUserCreatedBy(User userCreatedBy) {
		this.userCreatedBy = userCreatedBy;
	}


	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="updatedBy")
	public User getUserUpdatedBy() {
		return this.userUpdatedBy;
	}

	public void setUserUpdatedBy(User userUpdatedBy) {
		this.userUpdatedBy = userUpdatedBy;
	}


	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="ownBy")
	public User getUserOwnBy() {
		return this.userOwnBy;
	}

	public void setUserOwnBy(User userOwnBy) {
		this.userOwnBy = userOwnBy;
	}

}